package com.alibaba.cirtus.ots.application.adapter.ability.model.api;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.List;
@Data
public class CreateFulfillmentOrderOpenApiReq extends CommonReq{
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,请求编码"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,请求编码,50",
            max = 50
    )
    private String requestNo;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,来源单号"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,来源单号,50",
            max = 50
    )
    private String sourceOrderNo;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,业务单据类型"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,业务单据类型,50",
            max = 50
    )
    private String refOrderType;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,履约类型"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,履约类型,10",
            max = 10
    )
    private String fulfillmentType;
    @Length(
            message = "DELIVERY-F-107-00-00-049,履约优先级,3",
            max = 3
    )
    private String priority;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,发货仓编码（逻辑仓）"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,发货仓编码（逻辑仓）,50",
            max = 50
    )
    private String logicShippingWarehouseCode;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,产品组编码"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,产品组编码,50",
            max = 50
    )
    private String productGroupCode;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,业务渠道编码"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,业务渠道编码,50",
            max = 50
    )
    private String channelCode;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,销售组织编码"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,销售组织编码,50",
            max = 50
    )
    private String salesOrganizationCode;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,客户送达方编码"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,客户送达方编码,50",
            max = 50
    )
    private String shipToPartyCode;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,客户售达方编码"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,客户售达方编码,50",
            max = 50
    )
    private String soldToPartyCode;
    @Length(
            message = "DELIVERY-F-107-00-00-049,收货仓编码,50",
            max = 50
    )
    private String logicReceivingWarehouseCode;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,创建人"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,创建人,50",
            max = 50
    )
    private String creator;
    @Length(
            message = "DELIVERY-F-107-00-00-049,期望交货日期,10",
            max = 10
    )
    private String expectedDeliveryDate;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,配送方式编码"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,配送方式编码,50",
            max = 50
    )
    private String shippingMethodCode;
    @Length(
            message = "DELIVERY-F-107-00-00-049,备注,200",
            max = 200
    )
    private String remark;
    @Length(
            message = "DELIVERY-F-107-00-00-049,扩展字段,1024",
            max = 1024
    )
    private String bizFeatures;
    @Valid
    @NotEmpty(
            message = "DELIVERY-F-107-00-00-048,履约单明细"
    )
    @Size(
            message = "DELIVERY-F-107-00-00-049,履约单明细,100",
            max = 100
    )
    private List<CreateFulfillmentOrderDetailOpenApiDTO> detailList;
    @NotBlank(
            message = "DELIVERY-F-107-00-00-048,是否提交"
    )
    @Length(
            message = "DELIVERY-F-107-00-00-049,是否提交,1",
            max = 1
    )
    private String autoSubmit;

}
